<template>
  <div style="width: 100%;height: 350px; overflow:auto;">
    <el-table :data="list"  style="width: 100%;padding-top: 0px;"
              :default-sort = "{prop: 'time', order: 'descending'}">
      <el-table-column label="车牌号" width="100" align="center">
        <template slot-scope="scope">
          {{scope.row.carno}}
        </template>
      </el-table-column>
      <el-table-column label="停车场" align="center">
        <template slot-scope="scope">
          {{scope.row.road}}
        </template>
      </el-table-column>
      <el-table-column prop="time" label="上传时间"  align="center" sortable>
        <template slot-scope="scope">
          {{scope.row.time}}
        </template>
      </el-table-column>
      <!--<el-table-column-->
        <!--label="详情"-->
        <!--width="50">-->
        <!--<template slot-scope="scope">-->
          <!--<el-button @click="handleClick(scope.row)" type="text" size="small">详情</el-button>-->
        <!--</template>-->
      <!--</el-table-column>-->
    </el-table>
  </div>
</template>

<script>
  import ElTag from '../../../../node_modules/element-ui/packages/tag/src/tag'
  import ElRow from 'element-ui/packages/row/src/row'

  export default {
    components: { ElRow, ElTag }, data() {
      return {
        list: [
          { carno: '鲁A12345', road: '丁豪广场停车场', time: '2018-06-12 12:25:32' },
          { carno: '鲁A52652', road: '万达广场停车场', time: '2018-06-11 12:25:32' },
          { carno: '鲁A65895', road: '甸柳庄停车场', time: '2018-06-12 12:20:32' },
          { carno: '鲁A96584', road: '龙奥大厦停车场', time: '2018-06-10 12:25:32' },
          { carno: '鲁B85698', road: '双山停车场', time: '2018-06-11 12:35:32' },
          { carno: '鲁B56985', road: '中烟停车场', time: '2018-06-10 13:25:32' },
          { carno: '鲁A1236F', road: '泉城路停车中心', time: '2018-06-10 16:25:32' },
          { carno: '鲁AVF5S8', road: '泉城广场地下停车场', time: '2018-06-12 12:05:32' }
        ]
      }
    },
    filters: {
      statusFilter(status) {
        const statusMap = {
          success: 'success',
          pending: 'danger'
        }
        return statusMap[status]
      }
    },
    created() {
    },
    methods: {
      handleClick(val) {
        console.log(val)
      }
    }
  }
</script>
